package com.skyline.wo.model;

import com.skyline.base.model.Resource;
import com.skyline.base.model.TokenValidatable;
import com.skyline.common.cache.Cachable;

/**
 * Aricle is POJO of the Aricle Object. By using AricleMapper can map a record
 * to An Aricle
 * 
 * @author Jairus Chan
 * @version 0.1
 * 
 */
public class Article extends Resource implements TokenValidatable, Cachable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1836113236194354045L;

	private String title;
	private String content;
	private String digest;
	private Long categoryId;
	private String categoryName;
	private String submitToken;

	public Article() {

	}

	public Article(Integer authority, Long ownerId, String ownerPortrait, String ownerNickname, String title, String content,
			String digest, Long categoryId, String categoryName) {
		this.authority = authority;
		this.ownerId = ownerId;
		this.ownerPortrait = ownerPortrait;
		this.ownerNickname = ownerNickname;
		this.title = title;
		this.content = content;
		this.digest = digest;
		this.categoryId = categoryId;
		this.categoryName = categoryName;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getDigest() {
		return digest;
	}

	public void setDigest(String digest) {
		this.digest = digest;
	}

	public Long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	@Override
	public String getFkId() {
		return this.ownerId.toString();
	}

	@Override
	public String getSubmitToken() {
		return this.submitToken;
	}

	@Override
	public void setSubmitToken(String submitToken) {
		this.submitToken = submitToken;
	}

}
